package pl.pkolodziej.platform.dao.news;

import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import pl.pkolodziej.platform.vo.news.News;

@Repository
public class NewsDAOImpl implements NewsDAO {
	
	@Autowired
	SessionFactory sessionFactory;
	
	public List<News> listNews() {
		return sessionFactory.getCurrentSession().createQuery("from News").list();
	}

}
